<template>
  <div id="app">
    
	<Loading v-show="$root.bLoading"/>
	<Hheader v-if="bHeader"/>
	<router-view></router-view>
	<Hfooter v-if="bFooter"/>
	
  </div>
</template>


<script>
	import Hheader from '../components/header.vue'
	import Hfooter from '../components/footer.vue'
	import Loading from '../components/loading.vue'
	export default {
		  name: 'App',
		  data(){
			return{
				bHeader:true,
				bFooter:true
			}  
		  },
		  components: {
			Hheader,Hfooter,Loading
		  },
		  watch:{
		      $route(value){
		        let path = value.path;
		        if(/home|follow|column/.test(path)) this.bHeader=this.bFooter=true;
		        if(/detail|login|reg/.test(path)) this.bHeader=this.bFooter=false;
		        if(/user|cart|flowerlist/.test(path)){
		          this.bHeader=false;
		          this.bFooter=true;
		        }
		      }
		    }
		}
</script>

<style>
	/* #app{
		background-image: url(../assets/img/background_01.jpg);
		background-repeat:no-repeat;
		background-size:cover;
	} */
</style>
